package gov.mmgt.netmanager.models;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;   
import javax.persistence.Entity;   
import javax.persistence.GeneratedValue;
import javax.persistence.Id;   
import javax.persistence.Table;

@Entity  
@Table(name="ACCOUNT", catalog = "db") 
public class Account {
	private Integer id;
	private String account;
	private String password;
	private String name;
	private boolean isAdmin;
	
	public Account(){
		
	}
	
	public Account(String account, String password,String name,boolean isAdmin){
		this.account = account;
		this.password = password;
		this.name = name;
		this.isAdmin = isAdmin;
	}
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "ACCOUNT", nullable = false, length = 20)
	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "PASSWORD", nullable = false, length = 100)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "NAME", nullable = false, length = 20)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "IS_ADMIN", nullable = false)
	public boolean isAdmin() {
		return isAdmin;
	}

	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}
}
